using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace UM_Model.Models.Mapping
{
    public class FeedBackMap : EntityTypeConfiguration<FeedBack>
    {
        public FeedBackMap()
        {
            // Primary Key
            this.HasKey(t => t.FeedBackID);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(50);

            this.Property(t => t.Title)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("FeedBack");
            this.Property(t => t.FeedBackID).HasColumnName("FeedBackID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.Comment).HasColumnName("Comment");
            this.Property(t => t.IsEnable).HasColumnName("IsEnable");
        }
    }
}
